package lei.l_存储文件;

/**
 * @className: main3
 * @author: xl
 * @date: 2025/7/31 20:26
 * @Version: 1.0
 * @description:
 */

public class main3 {

    public static void main(String[] args) {
        // 读取文本文件
        String textContent = (String) UniversalFileStorage.readFile("test.txt", String.class);
        System.out.println("Text Content: " + textContent);

        // 读取二进制文件
        //byte[] binaryContent = (byte[]) UniversalFileStorage.readFile("image.jpg", byte[].class);

        // 读取JSON文件并转换为对象
        User user = (User) UniversalFileStorage.readFile("user.json", User.class);
        System.out.println(user);

    }
}

